<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url() . '/style/admin/css/public.css' ?>">
	<title>Document</title>
</head>
<body>
	<form action="" method="POST">
		<table class="table">
			<tr>
				<td class="th" colspan="10">添加角色</td>
			</tr>
			<tr>
				<td>角色名称</td>
				<td><input type="text" name="title" value="<?php echo set_value('title', isset($role['title'])? $role['title']:''); ?>"/>
					<?php echo form_error('title','<span>','</span>') ?>
				</td>
			</tr>
			<tr>
				<td>状态</td>
				<td>
					<input type="radio" name="status" value="0"<?php echo set_radio('status',0, isset($role['status']) && $role['status']==0 ? ture:false) ?>/>关闭
					<input type="radio" name="status" value="1"<?php echo set_radio('status',1, isset($role['status']) && $role['status']==1 ? true:false) ?> />开启
				</td>
			</tr>
			<tr>
				<td colspan="10"><input type="submit" value="提交" class="input_button"/></td>
			</tr>
		</table>
	</form>
	<table class="table">
		<tr>
			<td class="th" colspan="10">角色列表</td>
		</tr>
		<tr>
			<td>GID</td>
			<td>角色名称</td>
			<td>状态</td>
			<td>操作</td>
		</tr>
		<?php foreach($roles as $k => $v): ?>
		<tr>
			<td><?php echo $v['id'] ?></td>
			<td><?php echo $v['title'] ?></td>
			<td><?php echo $v['status'] ?></td>
			
			<td>
				[<a href="<?php echo site_url('admin/auth/set_access/'.$v['id']) ?>">权限配置</a>]
				[<a href="<?php echo site_url('admin/auth/role/'.$v['id']) ?>">编辑</a>]
				[<a href="<?php echo site_url('admin/auth/del_role/'.$v['id']) ?>">删除</a>]
			</td>
		</tr>
		<?php endforeach; ?>
	</table>











</body>
</html>